<?php
/**
 *
 * @author dinglin
 * 常用方法
 */
class Util_Util{
    /**
     * 去掉非法的js代码,对br也会做过滤,仅限用在标题和列表的描述部份
     * @param string $content
     * @return string
     */
    public static function html_char_replace($content){
        $find = array ("<script>", "</script>", "<iframe", "</iframe>", "[font=Arial]", "[/font]", "<br/>", "<br>" );
        $replace = array ("&lt;script&gt;", "&lt;/script&gt;", "&lt;iframe", "&lt;/iframe&gt;", "", "", "" ,"" );
        $content = str_replace($find, $replace, $content);
        return $content;
    }
}